package com.godfrey.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * 实体类
 *
 * @author godfrey
 * @date 2020-07-23
 */
@Entity
@ApiModel("用户实体")
@Table(name = "tb_user")
@Data
public class User implements Serializable {

    private static final long serialVersionUID = 4874167929879128188L;

    @Id
    @ApiModelProperty("主键id")
    private Integer id;

    @ApiModelProperty("用户名")
    @Column(name = "username", unique = true, nullable = false, length = 64)
    private String username;

    @ApiModelProperty("密码")
    @Column(name = "password", nullable = false, length = 64)
    private String password;

    @ApiModelProperty("邮箱")
    @Column(name = "email", length = 64)
    private String email;
}
